package com.naodong.shenluntiku.di.module;

import com.naodong.shenluntiku.mvp.contract.StudyContract;
import com.naodong.shenluntiku.mvp.contract.StudySetContract;
import com.naodong.shenluntiku.mvp.model.StudyModel;
import com.naodong.shenluntiku.mvp.model.StudySetModel;

import dagger.Module;
import dagger.Provides;
import me.shingohu.man.di.scope.ActivityScope;

/**
 * Created by Administrator on 2017/5/30.
 */

@Module
public class StudyModule {

    private StudyContract.View view;

    /**
     * 构建StudySetModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     * @param view
     */
    public StudyModule(StudyContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    StudyContract.View provideStudyView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    StudyContract.Model provideStudyModel(StudyModel model) {
        return model;
    }
}
